<?php
/* @var $this TypeController */
/* @var $model Type */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'type-form',
	'htmlOptions'=>array('class'=>'form-horizontal'),
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Les champs marqués d'une <span class="required">*</span> sont requis.</p>

	<?php echo $form->errorSummary($model,NULL,NULL,array("class"=>"alert alert-danger")); ?>

	<div class="form-group<?php if ($model->getErrors('lib')) echo " has-error";?>">
		<?php echo $form->labelEx($model,'lib',array("class"=>"col-lg-2 control-label")); ?>
		<div class="col-lg-10"><?php echo $form->textField($model,'lib',array("class"=>"form-control","placeholder"=>"Saisir le nom du type",'maxlength'=>255)); ?></div>
	</div>
	
	<div class="form-group">
		<div class="col-lg-offset-2 col-lg-10">
			<?php echo CHtml::submitButton($model->isNewRecord ? 'Ajouter le type' : 'Sauvegarder le type',array("class"=>"btn btn-primary")); ?>
			<?php echo CHtml::link($model->isNewRecord ? "Annuler l'ajout" : "Annuler les modifications",array('type/admin'),array('class'=>"btn btn-sm btn-info"));	?>
		</div>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->